package fr.mma.livraison.cron;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import fr.mma.livraison.channel.dao.ChannelDao;
import fr.mma.livraison.channel.persistance.Channel;

public class CleanChannelServlet extends HttpServlet {

	/**	 */
	private static final long serialVersionUID = -7636277598399949021L;

	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		final ChannelDao channelDao = new ChannelDao();
		for (Channel channel : channelDao.getAll()) {
			channelDao.delete(channel);
		} 
	}

}
